<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Known Issues</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>

<body>


<div class="container">

    <div class="google-search-bar">
        <script>
          (function() {
            var cx = '007961148920562332911:oocvtwz5jce';
            var gcse = document.createElement('script');
            gcse.type = 'text/javascript';
            gcse.async = true;
            gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(gcse, s);
          })();
        </script>
        <gcse:search></gcse:search>
    </div>

  <div class="content">
	
	
	 
    <div class="page-body">
	
    
         
	    
      	<div class="sidebar-nav">
	        <h4><a href="Documentation.html">Documentation</a></h4>
	        <ul>
	          <li><a href="Overview.html">Overview</a></li>
	          <li><a href="ReleaseNotes.txt">Release Notes</a></li>
          </ul>
	        <strong>Essentials:</strong>
            <ol>
              <li><a href="Installation.html">Installation</a></li>
              <li><a href="QuickStart.html">Quick Start</a></li>
              <li><a href="BasicUsage.html">Basic Usage</a></li>
              <li><a href="Deployment.html">Deployment</a></li>
              <li><a href="BestPractices.html">Best Practices</a></li>
              <li><a href="RewiredEditor.html">Rewired Editor</a></li>
              <li><a href="https://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
            </ol>
            <strong>Concepts:</strong>
            <ul>
              <li><a href="InputManager.html">Input Manager</a></li>
              <li><a href="Players.html">Players</a></li>
              <li><a href="Actions.html">Actions</a></li>
              <li><a href="InputBehaviors.html">Input Behaviors</a></li>
              <li><a href="Controllers.html">Controllers</a></li>
              <li><a href="ControllerMaps.html">Controller Maps</a></li>
              <li><a href="ControllerTemplates.html">Controller Templates</a></li>
              <li><a href="MapCategories.html">Map Categories</a></li>
              <li><a href="Layouts.html">Layouts</a></li>
              <li><a href="LayoutManager.html">Layout Manager</a></li>
              <li><a href="MapEnabler.html">Map Enabler</a></li>
              <li><a href="CustomControllers.html">Custom Controllers</a></li>
            </ul>
            <strong>Extras:</strong>
            <ul>
              <li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
	          <li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
              <li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
	          <li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
            </ul>
            <strong>Misc:</strong>
            <ul>
	          <li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
	          <li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
	          <li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
	          <li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
            </ul>
            <strong>How To's:</strong>
            <ul>
            	<li><a href="HowTos.html">See all topics...</a></li>
            </ul>
            <strong>Help:</strong>
            <ul>
              <li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
              <li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
              <li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
              <li><a href="KnownIssues.html">Known Issues</a></li>
              <li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
	          <li><a href="Examples.html" title="Examples">Examples</a></li>
              <li><a href="Integration.html">Integrations</a></li>
	          <li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
            </ul>
            <strong>FAQ</strong>
            <ul>
            	<li><a href="FAQ.html">See all topics...</a></li>
            </ul>
            <strong>Unity Help:</strong>
            <ul>
              <li><a href="https://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
              <li><a href="https://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
              <li><a href="https://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
            </ul>
            <strong>Links:</strong>
            <ul>
              <li><a href="https://guavaman.com/projects/rewired">Rewired Website</a></li>
              <li><a href="https://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
            </ul>
        </div>
        
    
    	<div class="main-body">
	        <div class="logo"><a href="https://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
                     
          <h1>
            <!-- InstanceBeginEditable name="PageHeader" -->Known Issues
      <!-- InstanceEndEditable -->
            </h1>
            
			<!-- InstanceBeginEditable name="MainBody" -->

    <p><strong>Topics:</strong></p>
    <h3><a href="#general">General</a></h3>
    <ul>
      <li><a href="#not-compatible-unity-new-input-system">Compatibility with Unity's &quot;new&quot; input system</a></li>
      <li><a href="#windows-standalone-il2cpp-vs2019-hang">All platforms compiled with IL2CPP on Windows: Builds never finish, build fails with errors, builds crash, built exe hangs at launch, or builds throw exceptions about duplicate Actions</a></li>
      <li><a href="#running-in-a-sandbox">Running in a Sandbox</a></li>
    </ul>
    <h3><a href="#windows">Windows:</a></h3>
    <ul>
      <li><a href="#windows-wgi-close-stall">Windows Standalone, Use Windows Gaming Input: Stall when Unity Editor or application is closed</a></li>
      <li><a href="#windows-xbox-series-x-dont-work-out-of-focus">Windows Standalone: Xbox Series S/X controllers do not work when application is out of focus when Use XInput is disabled</a>.</li>
      <li><a href="#windows-editor-keyboard-keys-stuck-raw-input">Windows Editor: Keyboard keys sticking for the same duration they were pressed after being released</a></li>
      <li><a href="#windows-10-second-stall">Windows Standalone: Extra 10 second stall when pressing Play in the Unity editor and when running a build</a></li>
      <li><a href="#windows-standalone-il2cpp">Windows Standalone, IL2CPP: Rewired falls back to Unity input</a></li>
      <li><a href="#windows-directinput-joysticks-not-detected-net46">Windows Standalone, Direct Input: Joysticks not detected when using .Net 4.6 scripting backend</a></li>
      <li><a href="#windows-editor-oculus-touch-crash">Windows Editor: Crash in Unity 5.6+ with Oculus Touch</a></li>
      <li><a href="#xinput-device-name">Windows Platforms: XInput devices on Windows appear as &quot;XInput Gamepad&quot;</a></li>
      <li><a href="#windows-xinput-devices-use-x360-map">Windows Platforms: All XInput devices use the Xbox 360 Controller map when &quot;Use XInput&quot; is enabled</a></li>
      <li><a href="#more-than-4-xbox-controllers">More than 4 XBox controllers cannot be used at the same time</a></li>
      <li><a href="#windows-xinput-xbox-one-bluetooth-vibration-disconnect-lag">Windows Standalone (Use XInput enabled): Wireless Bluetooth Xbox One Controllers cause frame rate drop when disconnected during vibration</a></li>
      <li><a href="#win-10-insider-preview-xinput-crash">Windows Standalone (Use XInput enabled, Windows 10 Insider Preview): Game crashes when using or plugging in an XInput-compatible controller.</a></li>
      <li><a href="#windows-10-fallback-xbox-one-mapping-issues">Windows Standalone (Unity Fallback, Windows 10): Xbox One Controller L/R and D-Pad mapping problems</a></li>
      <li><a href="#windows-10-xbox-one-crash">Windows Standalone (Raw Input, Windows 10): XBox One controller causes system crash when removed when using Raw Input on Windows 10</a></li>
      <li><a href="#direct-input-windows-10-multiple-xbox-one-controllers-hang">Windows Standalone (Direct Input, Windows 10): Using two or more XBox One controllers  will cause Unity to hang when using Direct Input on Windows 10</a></li>
      <li><a href="#windows-10-xbox-one-controller-stops-working-after-unplug">Windows Standalone (Windows 10): Xbox One Controller stops working after another controller is unplugged</a></li>
      <li><a href="#windows-xbox-one-controller-game-center-popup-bug">Windows Standalone (Windows 10): Game Center popup keeps appearing when pressing keyboard keys</a></li>
      <li><a href="#windows-fallback-xbox-one-controller-mapping">Windows Standalone (Unity Fallback, Windows 10): XBox One controller has incorrect mapping</a></li>
      <li><a href="#windows-nvidia-shield-controller-problems">Windows Standalone: Nvidia Shield Controller problems on Raw Input and Direct Input</a></li>
      <li><a href="#net46-windows-freeze-on-exit">Windows Standalone, .NET 4.6 experiemental backend: Application freezes on exit in Unity 2017</a></li>
      <li><a href="#unity-2011-dot-net-46-editor-errors">Windows </a><a href="#net46-windows-freeze-on-exit">Standalone</a><a href="#unity-2011-dot-net-46-editor-errors">, .NET 4.6 experimental backend: Editor corruption in Unity 2017.1</a></li>
      <li><a href="#windows-ri-hid-error">Windows Editor: &lt;RI.Hid&gt; Failed to create device file: 2 The system cannot find the file specified.</a></li>
      <li><a href="#windows-stuck-button-right-click-window-title-bar">Windows Standalone: Keyboard and mouse keys get stuck on when holding a key, right-clicking on the window's title bar, and then releasing the key</a></li>
      <li><a href="#windows-app-store-u5">Windows App Store support not working in Unity 5.0.0, fixed in 5.0.1</a></li>
      <li><a href="#windows-high-refresh-rate-mouse-slowdown">Windows Standalone: High refresh rate mouse causes slowdown and profiler spikes</a></li>
    </ul>
    <h3><a href="#uwp">Windows 10 Universal (UWP):</a></h3>
    <ul>
      <li><a href="#uwp-il2cpp-error-2020-2">Windows 10 Universal: IL2CPP build error <span class="code">(no further information about what managed code was being converted is available)</span></a><span class="code"></span></li>
      <li><a href="#uwp-gamepads-appear-twice">Windows 10 Universal: Certain gamepads appear twice  when HID device support is enabled</a></li>
      <li><a href="#uwp-il2cpp-controller-disconnect-crash">Windows 10 Universal IL2CPP: Crash when disconnecting controllers</a></li>
      <li><a href="#uwp-shift-keys">Windows 10 Universal: Left Shift is activated when Right Shift is pressed</a></li>
      <li><a href="#uwp-net-550-reference-rewriter-error">Windows 10 Universal .NET: UnityException: Failed to run reference rewriter error on Unity 5.5.0, 5.5.1</a></li>
    </ul>
    <h3><a href="#osx">MacOS:</a></h3>
    <ul>
      <li><a href="#osx-application-freeze-on-initialize">OSX: Application freezes forever when initializing Rewired</a></li>
      <li><a href="#osx-apple-silicon-crash">OSX, Apple Silicon: Build crashes when a controller is connected</a></li>
      <li><a href="#osx-standalone-il2cpp">OSX, IL2CPP: Rewired falls back to Unity input</a></li>
      <li><a href="#osx-net46-initialization-exception">OSX, .NET 4.6 experimental backend: Throws exception on initialization in Unity 2017.1 - Unity 2017.3</a></li>
      <li><a href="#osx-game-controller-framework">MacOS: Game Controller Framework</a>
        <ul>
          <li><a href="#osx-gccontroller-vibration-connection-bug">MacOS, Game Controller Framework: Controller vibration stops working on some controllers when another controller is connected or disconnected</a></li>
          <li><a href="#osx-gccontroller-sony-controller-problems">MacOS, Game Controller Framework: Sony Dual Shock 4 and Dual Sense controller issues</a></li>
    </ul>
      </li>
      </ul>
    <h3><a href="#linux">Linux:</a></h3>
    <ul>
      
      <li><a href="#linux-standalone-il2cpp">Linux, IL2CPP: Rewired falls back to Unity input</a></li>
      <li><a href="#keyboard-stuck-linux">Keyboard keys stuck on Linux in Unity 5.1.1</a></li>
      <li><a href="#linux-keyboard-repeat-bug-builds">Keyboard keys repeat when held on Linux in builds</a></li>
    </ul>
<h3><a href="#unity-editor">Unity Editor (all platforms):</a></h3>
<ul>
  <li><a href="#editor-recompile-after-finished-playing">Rewired stops working when changing scripts in Play mode with &quot;Recompile After Finished Playing&quot; option</a></li>
  <li><a href="#control-mapper-compiler-error-unity-2019-1-5f1">Compiler error in Unity 2019.1.5f1 when Control Mapper installed</a></li>
  <li><a href="#assembly-errors-2019-2">Assembly errors in projects upgraded to Unity 2019.2</a></li>
  <li><a href="#assembly-errors-2019-3-alpha-beta">Assembly and build errors in Unity 2019.3 alpha/beta</a></li>
  <li><a href="#increased-compile-play-time-editor">Rewired increases compile time and load time after pressing Play in the editor</a></li>
      <li><a href="#serialized-data-corruption-after-import">Serialized data corruption after importing Rewired</a></li>
      <li><a href="#serialized-data-corruption-after-upgrading-unity">Serialized data corruption after upgrading Unity</a></li>
      <li><a href="#installer-bug-1181">Installer error in Rewired 1.1.8.1</a></li>
      <li><a href="#il2cpp-p0-marshaled-error">IL2CPP: _p0_marshaled': undeclared identifier error on Unity 5.3.2p1, 5.3.2p2</a></li>
      <li><a href="#compiler-error-512-patch">Compiler error in 5.1.2 patch releases</a></li>
      <li><a href="#editor-is-compiling-gc-alloc">InputManager_Base.Update generates 17 bytes of GC Alloc per frame in the Profiler</a></li>
    </ul>
    <h3><a href="#android">Android:</a></h3>
    <ul>
      <li><a href="#android-remotes">Remotes are not detected (Nexus Player, Amazon Fire TV, Razer Forge TV, etc.)</a></li>
      <li><a href="#android-unity-joystick-bugs-v5_5">Joysticks do not sent connect/disconnect events, multiple joysticks appear when the same joystick is unplugged and re-plugged</a></li>
      <li><a href="#android-il2cpp-ndk-compiler-bug">IL2CPP: Editor crashes or takes a very long time to compile or stalls forever</a></li>
      </ul>
    <h3><a href="ios-tvos">iOS/tvOS:</a></h3>
    <ul>
      <li><a href="#ios-tvos-pause-menu-dont-work">Gamepad Pause button and Siri Remote Menu button don't work</a></li>
      <li><a href="#ios-tvos-13-gamepad-left-stick-x-not-working">iOS/tvOS 13: Gamepad left stick X doesn't work</a></li>
    </ul>
<h3><a href="xbox-one">Xbox One:</a></h3>
    <ul>
      <li><a href="#xbox-one-controller-connections-error">Controller connections and disconnections do not work</a></li>
    </ul>
<h3><a href="#sdl2">SDL2:</a></h3>
    <ul>
      <li><a href="#sdl2-osx-editor-haptic-feedback-not-supported">OSX - Editor does not support haptic feedback</a></li>
      <li><a href="#sdl2-osx-xbox-360-controller-no-vibration">OSX - Xbox 360 Controller does not support vibration</a></li>
      <li><a href="#sdl2-windows-xbox-360-vibration-motors">Windows - XBox 360 Controller does not allow independent control of vibration motors</a></li>
    </ul>
    <h3><a href="#steam">Steam:</a></h3>
    <ul>
      <li><a href="#steam-windows-tab-shift-keys-stuck-overlay">Windows - Tab and Shift keys get stuck on after opening Steam overlay using the keyboard</a></li>
    </ul>
<hr />
<p>&nbsp;</p>
<h2><a name="general" id="general"></a>General:</h2>
<h3><a name="not-compatible-unity-new-input-system" id="not-compatible-unity-new-input-system"></a>Compatibility with Unity's &quot;new&quot; input system</h3>
<p><strong>Update:</strong> As of Unity 2021.2.0f1, Rewired can now work alongside Unity's new input system on Windows. If you need to use both Rewired and Unity's new input system simultaneously, update to Unity 2021.2.0f1+. To use both together, use the following setting:</p>
<p>Player Settings -&gt; Active Input Handling -&gt; Both</p>
<p>Note: The only platform with known issues running both systems together was Windows Standalone. If other incompatibilites exist on other platforms, they are currently unknown and untested.</p>
<p><strong>For versions prior to 2021.2.0f1:</strong></p>
<p>Rewired is not compatible with Unity's new input system. If you enable the new input system by setting this value to &quot;Input System&quot; or &quot;Both&quot;, Rewired and/or Unity's input system may not function at all or parts of each system may not function correctly. While some platforms may work, others may not.</p>
<p>The only setting supported by Rewired is:<br />
  Player Settings -&gt; Active Input Handling -&gt; Input Manager</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-standalone-il2cpp-vs2019-hang" id="windows-standalone-il2cpp-vs2019-hang"></a>All platforms compiled with IL2CPP on Windows: Builds never finish, build fails with errors, builds crash, built exe hangs at launch, or builds throw exceptions about duplicate Actions</h3>
<p><strong>Update: This issue no longer affects Rewired 1.1.40.0+. Update to the latest version of Rewired.</strong></p>
<p>The latest version at the time of writing this, Visual Studio 2019 16.8.6, still exhibits this error.</p>
<p>Due to a new compiler bug in Visual Studio 2019 16.5+, when built with IL2CPP using the Unity Editor on Windows with Visual Studio 2019 installed, the build may never finish (hang during compile), crash during compile, the built executable may hang after launch, or they may throw exceptions about duplicate Actions, or potentially unlimited other possible manifestations. This issue can be avoided by uninstalling Visual Studio 2019 and installing Visual Studio 2017, or you can use one of the following workarounds to make builds work again in VS 2019.</p>
<p><strong>Update: </strong>This has been updated to disable just the jump threading   optimizer instead of the entire SSA optimizer based on feedback from   Microsoft.</p>
<p> I have tracked the issue down to a bug in the <a href="https://devblogs.microsoft.com/cppblog/new-code-optimizer/" target="_blank" rel="nofollow">new optimizer used in VS2019</a>.<br />
</p>
<ul>
  <li>This affects Release and Master builds, not debug builds.</li>
  <li>You can disable the new optimizer in the VS generated IL2CPP build   project by adding the following to the end of the IL2CPP command line:<br />
    --compiler-flags=-d2ssa-cfg-jt-</li>
</ul>
<p><br />
  <strong>Option 1: Editor Script (Probably the best solution)</strong> </p>
<ol>
  <li>Download the <a href="https://guavaman.com/projects/rewired/files/docs/DisableNewVS2019Optimizer.zip">DisableNewVS2019Optimizer</a> script and extract the cs file.</li>
  <li>Create a folder somewhere in your Unity project's Assets folder and name it Editor.</li>
  <li>Copy the DisableNewVS2019Optimizer.cs script into the Editor folder.</li>
  <li>Now IL2CPP builds on Windows will automatically have the new   optimizer disabled, but it won't affect builds to other build targets.</li>
  <li> Note that this method will not automatically copy the compiler flag options to the Visual Studio project if you choose to make an IL2CPP build with the &quot;Create Visual Studio Solution&quot; option in the build window. If &quot;Create Visual Studio Solution&quot; is enabled, you will have to manually add the compiler option by following the instructions under Option 2: Manual Build below.</li>
  <li><strong>Note that you will get a compiler error if you use this script and   do not have Visual Studio 2019 installed as VS 2017 or other versions   do not have this compiler flag option.</strong></li>
  <li> Deleting the script will not remove the compiler option if it has already been set. You can remove it by editing ProjectSettings\ProjectSettings.asset in a text editor under the heading additionalIl2CppArgs.</li>
</ol>
<strong>Option 2: Manual Build</strong><br />
<br />
Steps:<br />
<ol>
  <li>Set Unity Build Settings -&gt; PC, Mac &amp; Linux Standalone -&gt; Create Visual Studio Solution</li>
  <li>Build</li>
  <li>Open solution in Visual Studio</li>
  <li>Right click the IL2CPPOutputProject project in the Solution Explorer and select Properties.</li>
  <li>Make sure you have the correct build Configuration selected at the   top for the type of build you want to make (Master, Release, etc).</li>
  <li>Go to the NMake page</li>
  <li>On the Build Command Line field, add to the end (adding a space first):</li>
  <li>--compiler-flags=-d2ssa-cfg-jt-</li>
  <li>Compile</li>
  <li>Run</li>
  <li>No more infinite loops</li>
</ol>
<strong>Option 3: Environment Variable</strong><br />
<br />
On Windows, another easier way to disable the optimizer is to add an   environment variable. Be advised, this may cause IL2CPP builds for other   build targets to fail because I assume it will add the compiler option   regardless of the build target:<br />
<ol>
  <li>Click Start Menu</li>
  <li>Type environment</li>
  <li>Launch &quot;Edit the system environment variables&quot;</li>
  <li>Under &quot;User Variables for USERNAME&quot;, click New.</li>
  <li>Set the variable name to: IL2CPP_ADDITIONAL_ARGS</li>
  <li>Set the variable value to: --compiler-flags=-d2ssa-cfg-jt-</li>
  <li>Press Ok.</li>
  <li>Close all copies of the Unity editor and re-open it.</li>
  <li>Direct IL2CPP builds (without creating VS solution) will now work correctly.</li>
</ol>
<p>&nbsp;</p>
<hr />
<h3><a name="running-in-a-sandbox" id="running-in-a-sandbox"></a>Running in a Sandbox</h3>
<p><strong>Windows (tested with Sandboxie):</strong></p>
<ul>
  <li>  Due to a lack of permissions, Rewired is unable to receive device information from Raw Input when run inside a sandbox. Joysticks will not work properly in Raw Input mode. (As a note, Unity itself is also unable to receive this information, rendering joystick support in Unity broken under the default security settings.)</li>
  <li>Direct Input mode is able to receive joystick input, but joystick plug/unplug notifications are blocked, so hot-plugging does not work properly even in Direct Input mode.</li>
</ul>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h2><a name="windows" id="windows"></a>Windows</h2>
<p>&nbsp;</p>
<h3><a name="windows-wgi-close-stall" id="windows-wgi-close-stall"></a>Windows Standalone, Use Windows Gaming Input: Stall when Unity Editor or application is closed</h3>
<p><strong>Applies to Unity 5 - 2021, Mono scripting backend:</strong><br />
  When Use Windows Gaming Input is enabled, if a controller was ever connected during the applciation session, when the application is quit (Unity Editor or a game build), the application will stall for at least 30 seconds before closing. The cause has been traced to the use of unmanaged to managed callbacks in Mono. Callbacks are used to detect Windows Gaming Input controller connection and disconnection events. The issue does not occur in IL2CPP builds or in Unity 2022+.</p>
<h3>&nbsp;</h3>
<hr />
<h3><a name="windows-xbox-series-x-dont-work-out-of-focus" id="windows-xbox-series-x-dont-work-out-of-focus"></a>Windows Standalone: Xbox Series S/X controllers do not work when application is out of focus when Use XInput is disabled</h3>
<p>Xbox Series S/X controllers do not work when the application is out of focus. This is a problem at the driver level and is not an issue with Rewired. The driver does not send any Raw Input events to the application when it is out of focus even when explicitly told to do so when registering for Raw Input events. This affects Raw Input, Direct Input, and Unity input sources. This does not affect XInput.</p>
<h3>&nbsp;</h3>
<hr />
<h3><a name="windows-editor-keyboard-keys-stuck-raw-input" id="windows-editor-keyboard-keys-stuck-raw-input"></a>Windows Editor: Keyboard keys sticking for the same duration they were pressed after being released</h3>
<p><strong>Update:</strong> According to Unity, this bug will be fixed in Unity 2019.4.0f1.</p>
<ol>
  <li>Unity made a change to the editor update thread in <strong>2019.3.8</strong> (<a href="https://unity3d.com/unity/whats-new/2019.3.8" target="_blank" rel="nofollow">https://unity3d.com/unity/whats-new/2019.3.8</a> - Editor: Fixed the editor application main thread tick timer throttling causing unwanted spikes and delays. (<a href="https://issuetracker.unity3d.com/issues/editor-performance-drop-when-holding-down-keys-and-moving-mouse-when-in-playmode" target="_blank" rel="nofollow">1211383</a>)) that has resulted in this lag in a very roundabout way. The Windows message queue is having to wait on the editor GUI thread, so heavy CPU usage in the editor GUI update thread now maifests as a severe slowdown to the main thread if messages are waiting to be delivered to it by Raw Input. This issue persists as of 2019.3.15, the latest version, as of the date of this message.<br />
    </li>
  <li>The more work happening on the editor GUI thread, the worse the slowdown of the main thread will be when it has to wait on a Raw Input event to be delivered.</li>
  <li>This affects Raw Input, presumably because Raw Input relies on the Windows messaging queue for delivery of input events.</li>
  <li>This is most easily reproduced by having the Rewired Input Manager selected in the inspector with the Debug Information foldout open displaying a lot of fields such as when looking at Controllers -&gt; Keyboards and listing all the keys. With this open, the lag after releasing a key when held down for a second or more while is &gt; 1 second. Debug Information makes a lot of calls to Editor Prefs which slows down the editor thread enough to make the new issue visible.</li>
  <li><strong>This also affects Unity's new input system</strong> through the exact same mechanism of preventing the Raw Input events from being delivered in a timely manner to the input thread. The lag can be reproduced exactly simply by enabling their new input system and running a CPU-intensive operation in an editor script.</li>
</ol>
<p>This bug has been reported to Unity with a simple reproduction case using their new input system.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-10-second-stall" id="windows-10-second-stall"></a>Windows Standalone: Extra 10 second stall when pressing Play in the Unity editor and when running a build</h3>
<p>Reorts have been coming in recently of a 10 second stall when pressing Play in the Unity editor and when launching the game build. Every single instance of this has turned out to be a problem getting information from some piece of hardware attached to the system. This has happened with Corsair keyboards and a Mayflower Electronics headphone amplifier so far, but could potentially be caused by any HID device.</p>
<p>When a problem device is present, a 5-second stall happens when certain information is queried about the HID device such as getting the Product Name using the Windows API function HidD_GetProductString. This function may be called twice leading to a 10 second stall. This is a problem at the device / driver level and cannot be fixed in Rewired. Because of the sudden influx of reports like this, I can only make the educated guess that this is directly due to a new change in Windows in a recent update resulting in the 5-second stall with these devices. There is no other explanation because none of this code has changed in years, and before 2020, there were zero reports of anything like this from Rewired users.</p>
<p>This issue is not isolated to Rewired. Every single application that calls HidD_GetProductString on these devices will experience this stall. This has been reproduced using a HID library with one of these devices. Microsoft's Direct Input itself is also subject to this issue when getting the list of devices, with reports of this happening on the web. Even Microsoft's USB Game Controller tool in Windows apparently is affected by this, causing stalls and even crashing. There are also reports of this happening with SDL2, a hugely-popular cross-platform library.</p>
<p>This issue cannot be &quot;fixed&quot; because it is not an issue in Rewired but in the underlying device/driver/Windows API. The best way to resolve it is to identify the device or driver causing it and remove it or disable it in Device Manager. Some devices like the Mayflower Electronics headphone amplifier expose a HID device in Device Manager that can be disabled without affecting the functionality of the device itself.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-standalone-il2cpp" id="windows-standalone-il2cpp"></a>Windows Standalone, IL2CPP: Rewired falls back to Unity input</h3>
<p>Support for IL2CPP on desktop platforms was added in Rewired 1.1.22.0.</p>
<p><strong>Solution:</strong> <a href="Updating.html">Update Rewired</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-directinput-joysticks-not-detected-net46" id="windows-directinput-joysticks-not-detected-net46"></a>Windows Standalone, Direct Input: Joysticks not detected when using .Net 4.6 scripting backend</h3>
<p>Direct Input was moved into a native DLL in Rewired 1.1.22.0 and therefore no longer has this issue which was caused by the lack of support of a particular IL instruction in the .Net 4.6 scripting backend.</p>
<p><strong>Solution:</strong> <a href="Updating.html">Update Rewired</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-editor-oculus-touch-crash" id="windows-editor-oculus-touch-crash"></a>Windows Editor: Crash in Unity 5.6+ with Oculus Touch</h3>
<p>There have been multiple reports of  crashes in Unity 5.6+ on Windows when using Unity input as the input source with Oculus Touch controllers attached. This crash is not due to Rewired but is a Unity issue. It can be reproduced without Rewired involved by calling GetAxis and GetButton on the Oculus Touch controllers through UnityEngine.Input. It seems to occur most frequently immediately when pressing Play in the editor. It may be related to calling UnityEngine.Input on the Oculus Touch devices in Awake or on the first Update frame. It can reportedly be avoided by disabling the Rewired Input Manager in the inspector, then enabling it after Play mode has been entered. The effect this has is to defer making calls to UnityEngine.Input until after the first frame or two of Play mode.</p>
<p></p>
<p></p>
<hr />
<h3><a name="xinput-device-name" id="apple-tv-gyro2"></a>Windows Platforms: XInput devices on Windows appear as &quot;XInput Gamepad&quot;</h3>
<p>As of Rewired 1.1.47.0, it is now recommended that you enable <a href="RewiredEditor.html#settings-windows-use-windows-gaming-input">Use Windows Gaming Input</a> which supports all features of XInput and allows for better device identification. Also, on Windows UWP, Windows Gaming Support was updated to allow differentiation between Xbox 360 and Xbox One controllers in Rewired 1.1.47.0.
<p>On Windows, with Use XInput enabled, and always on Windows App Store and Windows 10 Universal builds, there's no way to differentiate one XInput controller type from another. To XInput, everything is simply Gamepad with an id of 0-3. This is not a Rewired issue, it is a design decision by Microsoft.<br />
  <br />
  There is no possible way to associate an   XInput id to the matching HID device to get its name and make it be recognized   as a specific controller. Because of this, you cannot identify an XInput controller by   name in Windows when XInput is enabled. This also affects which controller maps   are loaded for this joystick in Windows when using XInput. Since the device is   simply an Xinput device, it will be loaded from the XBox 360 controller   definition, not the Logitech F310, for example. 
  (However, if you create your controller maps using the Gamepad Template, you don't even need to worry about this.)
<p>The only way you will be able to identify these   controllers by name is to disable Use XInput in the Rewired Input Manager (applies to Windows Standalone only, not Windows App Store or Windows 10 Universal -- XInput cannot be disabled on these platforms). Once you do that, you introduce new   issues/limitations:</p>

<ol>
  <li>L/R triggers are treated as 1 combined axis and both   cannot be pressed simultaneously without canceling each other out.</li>
  <li>You lose universal XInput controller support because   each XInput controller now must be specifically recognized and mapped. Any unrecognized XInput devices will be treated as Unknown Controllers.</li>
  <li>Vibration is not supported.</li>
  <p>&nbsp;</p>
</ol>
<hr />
<h3><a name="windows-xinput-devices-use-x360-map" id="windows-xinput-devices-use-x360-map"></a>Windows Platforms: All XInput devices use the Xbox 360 Controller map when &quot;Use XInput&quot; is enabled</h3>
<p> As of Rewired 1.1.47.0, it is now recommended that you enable <a href="RewiredEditor.html#settings-windows-use-windows-gaming-input">Use Windows Gaming Input</a> which supports all features of XInput and allows for better device identification.</p>
<p>As explained in the <a href="#xinput-device-name">previous topic</a>, when Use XInput is enabled and always on Windows App Store and Windows 10 Universal builds, there is no way to differentiate one XInput device from another by name or product/vendor id. Therefore, all XInput devices will use the Xbox 360 Controller map on Windows when Use XInput is enabled. This will match all XInput devices, generic or not, and will provide full coverage of all XInput devices. You cannot map these devices based on the individual device type such as Xbox One or Logitech F310 when using XInput because the device cannot be identified as as specific device type  but rather simply as an XInput gamepad. All XInput gamepads will use Xbox 360 Controller profile when Use XInput is enabled.</p>
<p>If you disable Use XInput, you will get device-specific identification and recognition (Windows Standalone only, not Windows App Store or Windows 10 Universal), but you will also have the drawbacks <a href="#xinput-device-name">explained in the previous topic</a>.</p>
<p>There is rarely ever a need to map these controllers individually by using the specific device-type maps. Just create your Joystick Map using the Gamepad Template and it will cover <a href="SupportedControllers.html">all gamepads listed here</a> regardless of whether or not you have Use XInput enabled.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="more-than-4-xbox-controllers" id="dll-not-found-xinput6"></a>More than 4 XBox controllers cannot be used at the same time</h3>
<p><strong>Windows Standalone</strong></p>
<p>Windows Gaming Input:<br />
  As of Rewired 1.1.47.0, it is now recommended that you enable <a href="RewiredEditor.html#settings-windows-use-windows-gaming-input">Use Windows Gaming Input</a> which supports more than 4 XInput devices with support for all special controller features.</p>
<p>XInput:<br />
  XInput has a hard limit of 4 devices. This is not a Rewired limitation, it is a limitation in Microsoft's XInput system.</p>
<p>You can mix and match non-XInput devices with XInput devices for a total of more than 4, but you cannot use more than 4 XInput compatible devices simultaneously if XInput is enabled but Windows Gaming Input is disabled. If you need to support more than 4 XInput controllers, you can either disable XInput and use Raw/Direct Input or enable Windows Gaming Input in the <a href="RewiredEditor.html#Settings">Rewired Editor - Settings</a> page.</p>
<p>If both &quot;Use XInput&quot; and &quot;Use Windows Gaming Input&quot; are enabled, if Windows Gaming Input is unavalable on the system, XInput will be used as the fallback input source for compatible devices. Otherwise, the primary input source will be used as the fallback input source. This has some important implications. If your game absolutely requires support for more than 4 XInput-compatible devices, it is recommended you enable &quot;Use Windows Gaming Input&quot; but disable &quot;Use XInput&quot; so on systems that do not support Windows Gaming Input, Raw Input / Direct Input will be used as the fallback input source, allowing for more than 4 XInput-compatible devices to be used simultaneously, albeit with the caveats below. Otherwise, enable both &quot;Use XInput&quot; and &quot;Use Windows Gaming Input&quot; for best feature support.</p>
<p>Be advised that by disabling &quot;Use XInput&quot; and &quot;Windows Gaming Input&quot; in the Rewired Input Manager, Raw Input or Direct Input will be used to handle XInput-compatible controllers and will introduce these new   issues/limitations:</p>
<ol>
  <li>L/R triggers are treated as 1 combined axis and both   cannot be pressed simultaneously without canceling each other out.</li>
  <li>You lose universal XInput controller support because   each XInput controller now must be specifically recognized and mapped. Any unrecognized XInput devices will be treated as Unknown Controllers.</li>
  <li>Vibration is not supported.</li>
</ol>
<p><strong>OSX Standalone</strong><br />
  XBox 360 controllers on OSX require <a href="https://github.com/360Controller/360Controller/releases" target="_blank"> this XBox 360 driver</a>. This driver also imposes the 4-device limit just like XInput. It is currently not possible to use more than 4 XInput devices simultaneously on OSX. Again, you can mix and match non-XInput controllers to achieve a total count greater than 4. Because the driver is required for the controller to be detected, there is no way to disable the use of this driver and get around this issue.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-xinput-xbox-one-bluetooth-vibration-disconnect-lag" id="windows-xinput-xbox-one-bluetooth-vibration-disconnect-lag"></a>Windows Standalone (Use XInput enabled): Wireless Bluetooth Xbox One Controllers cause frame rate drop when disconnected during vibration</h3>
<p>The drop in frame rate is not caused by Rewried. It is indirectly caused by Unity, but ultimately the real culprit is XInput. There is nothing I can do to &quot;fix&quot; this issue because it is not caused by Rewired, nor is the CPU spike that causes the frame rate to drop even in Rewired's call stack -- it's in Unity's.</p>
<p>Sequence of events:</p>
<ul>
  <li>2 or more Xbox One controllers are attached.</li>
  <li>At least one of these is a Bluetooth controller and connected via Bluetooth.</li>
  <li>Vibrations are being sent continuously to the Bluetooth controller.</li>
  <li>The Bluetooth controller is disconnected (battery dies, etc.).</li>
  <li>XInput still reports this device present for 2 or more seconds.</li>
  <li>The other controller has to be actively producing some input (may just be axis noise in some cases.)<br />
  </li>
  <li>Unity stalls and stutters until the device is fully disconnected.</li>
</ul>
<p>During this period where the Bluetooth device has been connected but has not been reported as disconnected:<br />
</p>
<ul>
  <li>Calls to XInput functions do not return with errors.</li>
  <li>Calls to set vibration to XInput on the disconnected device   apparently stall out the entire XInput system regardless of which thread   is making the calls.<br />
  </li>
  <li>Calls to read input from XInput take an excessive amount of time,   even on a separate thread, because of the calls to set vibration on the   other thread.</li>
</ul>
<p>Rewired already  implements multiple separate threads to handle input and output (vibration) for XInput so so lags in function calls to XInput will not result in drops in frame rate. It also caps the frequency of set vibration calls to XInput because of prior problems with Xbox One controllers.</p>
<p>Unity is causing the application frame rate to drop under this scenario, not Rewired. This can be seen in the Unity profiler. The entry UpdateSceneManagerAndInput will report a very long time such as 250ms per frame during this period. This is a Unity function.</p>
<p>This is the best explanation I can come up with for the problem:<br />
</p>
<ul>
  <li>Unity is calling functions in XInput on the main thread that are   lagging out due XInput going into some kind of spasm because set vibration is being continuously called on a wireless Bluetooth controller that has been   disconnected but XInput has not reported it disconnected yet and is not   throwing errors when functions are being called on that device.</li>
  <li>Unity's input system cannot be disabled to avoid this issue.</li>
  <li> Unity could jump through hoops and   implement workarounds like moving XInput to another thread, but they can't fix the   underlying cause.</li>
  <li>Only Microsoft can fix it.</li>
</ul>
<p>The only possible workaround is to send fewer vibrations so the disconnecting controller doesn't get hammered with vibrations while it is in the bugged state. Do not spam controllers with vibrations unless you really have to. However, in the case you are playing back some kind of effect sequence, there is no way to avoid it.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="win-10-insider-preview-xinput-crash" id="win-10-insider-preview-xinput-crash"></a>Windows Standalone (Use XInput enabled, Windows 10 Insider Preview): Game crashes when using or plugging in an XInput-compatible controller.</h3>
<p>There have been reports of crashes when using XInput on one or more versions of Windows 10 Insider Preview. The crash can occur either on the start of the application (if an XInput-compatible device is attached) or when any XInput-compatible device is first attached. This issue is not an issue with Rewired but an issue with Windows 10 Insider Preview. I have been unable to reproduce any issue in Windows 10 Insider Preview.</p>
<p>The only possible workaround is to disable Use XInput in the Rewired Input Manager -&gt; Settings -&gt; Windows tab.</p>
<p>Rewired is 100% compliant with Microsoft's published guidelines for using XInput. Rewired works with all versions of XInput from Windows XP - Windows 10 without issue. If you or your customers experience this crash in Windows 10 Insider Preview, please report this error to Microsoft so they can fix it before rolling out the public release.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-10-fallback-xbox-one-mapping-issues" id="windows-10-xbox-one-crash2"></a>Windows Standalone (Unity Fallback, Windows 10): Xbox One Controller L/R and D-Pad mapping problems</h3>
<p>Due to Microsoft driver issues, on versions of Windows 10 before the Windows 10 Anniversary Update, the L/R triggers and D-Pad on the Xbox One Controller may be mapped incorrectly and non-functional when using Unity Fallback input. Microsoft made Xbox One Controller driver changes in an early version of Windows 10 that caused the controller mappings to change when retrieving values through the HID driver. This change did not affect XInput. Unity uses a combination of direct HID device access and XInput to get input from XInput compatible devices. This caused the standardized mappings in Unity's input system to break, cross-mapping the D-Pad and the triggers. Microsoft acknowledged this as a mistake and finally rolled back this driver change in the Windows 10 Anniversary Update rolled out on August 2, 2016. After this update, the mappings reverted to the normal mappings consistent with Windows 7. Only users using Windows 10 pre-Anniversary update are affected. This does not affect Rewired if using the native input options instead of Unity fallback input.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-10-xbox-one-crash" id="windows-10-xbox-one-crash"></a>Windows Standalone (Raw Input, Windows 10): XBox One controller causes system crash when removed when using Raw Input on Windows 10</h3>
<p>Update: This has been fixed as of Windows 10 Anniversary Update.</p>
<p>This is not a bug or issue with Rewired. A recent Windows Update has introduced a new bug in Windows 10 when using the XBox One controller. When Raw Input is enabled, if the XBox One controller is disconnected at runtime, it will cause the entire system to become unresponsive requiring a hard reboot to fix. I have isolated this issue to a specific Windows API Raw Input function call which is not optional. There is no known workaround for this problem when using Raw Input. This bug has been reported to Microsoft.</p>
<p>The only possible workaround is to enable Use XInput so the XBox One Controller is handled by XInput instead of Raw Input.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="direct-input-windows-10-multiple-xbox-one-controllers-hang" id="direct-input-windows-10-multiple-xbox-one-controllers-hang"></a>Windows Standalone (Direct Input, Windows 10): Using two or more XBox One controllers will cause Unity to hang when using Direct Input on Windows 10</h3>
<p>This is not a bug or issue with Rewired. A recent Windows Update has introduced a new bug in Windows 10 when using multiple XBox One controllers. When Direct Input is enabled, if two or more XBox One controller are attached, it will cause Unity to hang until all but one controller are removed.  I have isolated this issue to a specific Windows API Direct Input function call which is not optional. There is no known workaround for this problem when using Direct Input.</p>
<p>The only possible workaround  is to enable Use XInput so the XBox One Controller is handled by XInput instead of Direct Input.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-10-xbox-one-controller-stops-working-after-unplug" id="windows-10-xbox-one-controller-stops-working-after-unplug"></a>Windows Standalone (Windows 10): Xbox One Controller stops working after another controller is unplugged</h3>
<p>Applies to Windows 10 after Anniversary Update.</p>
<p>One or more Xbox One Controllers can stop working after unplugging any other Xbox One Controller. This is an Xbox One Controller driver bug introduced in the Windows Anniversary Update. There is no possible workaround to this issue. If this issue affects your game, please report it to Microsoft. This is not an issue with Rewired.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-xbox-one-controller-game-center-popup-bug" id="windows-xbox-one-controller-game-center-popup-bug"></a>Windows Standalone (Windows 10): Game Center popup keeps appearing when pressing keyboard keys</h3>
<p>Applies to Windows 10 after Anniversary Update.</p>
<p>When using Xbox One Controllers, At random, the Game Center popup may begin to appear every time a keyboard key is pressed or when clicking to different windows. This is an Xbox One Controller driver bug introduced in the Windows Anniversary Update. There is no possible workaround to this issue. If this issue affects your game, please report it to Microsoft. This is not an issue with Rewired.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-fallback-xbox-one-controller-mapping" id="windows-fallback-xbox-one-controller-mapping"></a>Windows Standalone (Unity Fallback, Windows 10): XBox One controller has incorrect mapping</h3>
<p>Microsoft changed the XBox One driver in Windows 10 and changed the mappings compared to Windows 7 and prior versions, then after the Windows 10 Anniversary Update, they reverted this driver  change. When using Unity fallback as the input source, it is impossible to differentiate the XBox One controller on Windows 10 pre and post Anniversary Update. Therefore, the decision was made to support only the newest mapping. Xbox One Controllers will have incorrect mappings on Windows 10 prior to the Anniversary Update.</p>
<p>This is not an issue when using Raw Input, Direct Input, or XInput. It is advised that you do not use UnityEngine fallback input as the input source on the Windows Standalone platform due to this and many, many other issues.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-nvidia-shield-controller-problems" id="windows-nvidia-shield-controller-problems"></a>Windows Standalone: Nvidia Shield Controller problems on Raw Input and Direct Input</h3>
<p>With newer firmware versions, the Nvidia Shield Controller has major problems on Raw Input and Direct Input  which cause massive slowdowns making the controller essentially unusable. The only way to support the controller on Windows is to enable Use XInput which is not subject to the same issues. The Nvidia Shield Controller can no longer be safely used on Windows Standalone without Use XInput enabled until Nvidia fixes the firmware problems. If the controller is used without Use XInput enabled, the frame rate will drop to an extremely low level. There is no possible workaround to this issue.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="net46-windows-freeze-on-exit" id="net46-windows-freeze-on-exit"></a>Windows Standalone, .NET 4.6 experiemental backend: Application freezes on exit in Unity 2017</h3>
<p><strong>Update:</strong> This Unity bug was fixed at some point in the Unity 2017 branch and does not appear in Unity 2017.4.14f1. The exact version where they fixed the bug is not known. It does not appear in Unity 2018.1.0f3 or later.</p>
<p><strong>Solution:</strong> Update to the Unity 2017.4.14f1+.</p>
<p>As of Unity 2017.2.0f3, when the .NET 4.6 experimental backend is enabled in Windows, the application will freeze forever on exit (closing via the X window button or Alt + F4). The error occurrs outside Rewired's code after it has already shut down. Unity has confirmed this bug in the .NET 4.6 backend but no ETA for a fix is known.</p>
<p><strong>Q: But it used to work before updating Rewired to 1.1.3.0+:</strong></p>
<p>It actually did have the same issue, but you just 
  couldn’t see it because Rewired was never actually running in native mode when 
  the 4.6 backend was enabled in versions prior to 1.1.3.0 because of an unrelated exception <br />
  that made it fall back to Unity input silently. This exception was due to an unrelated issue involving 
  reflection when using the .NET 4.6 backend. The exception was silently swallowed forcing Rewired 
  to run in UnityEngine.Input mode instead. In 1.1.3.0, the silent exception was fixed allowing native input to actually be initialized revealing the new .NET 4.6 bug. Native input never worked when using the 
  4.6 .NET backend. The fact that older versions looked like they worked was 
  just a fluke due to the unrelated exception preventing native input from being initialized.</p>
<p><em>Beta versions and experimental features of Unity are not supported by Rewired.</em></p>
<p>&nbsp;</p>
<hr />
<h3><a name="unity-2011-dot-net-46-editor-errors" id="unity-2011-dot-net-46-editor-errors"></a>Windows Standalone, .NET 4.6 experimental backend: Editor corruption in Unity 2017.1</h3>
<p><strong>Update:</strong> Unity fixed the bug in Unity 2017.1.p4.</p>
<p><strong>Solution:</strong> Update to Unity 2017.1.p4+.</p>
<p>The .NET 4.6 experimental backend contains a major bug that affects Rewired's ability to run in the editor. The 2nd time you press Play in the editor, it will throw thousands of exceptions and cause the editor to become corrupt until quit and restart. This bug has been reported to Unity.</p>
<p>More information about this bug can be found here:</p>
<ul>
  <li><a href="https://forum.unity3d.com/threads/rewired-advanced-input-for-unity.270693/page-66#post-3116639" title="https://forum.unity3d.com/threads/rewired-advanced-input-for-unity.270693/page-66#post-3116639" target="_blank">https://forum.unity3d.com/threads/rewired-advanced-input-for-unity.270693/page-66#post-3116639</a></li>
  <li><a href="https://forum.unity3d.com/threads/rewired-advanced-input-for-unity.270693/page-66#post-3116993" title="https://forum.unity3d.com/threads/rewired-advanced-input-for-unity.270693/page-66#post-3116993" target="_blank">https://forum.unity3d.com/threads/rewired-advanced-input-for-unity.270693/page-66#post-3116993</a></li>
</ul>
<p>The only workaround is to disable native input by setting the Primary Input Source for the editor platform you are using to Unity in the Rewired Input Manager -&gt; Settings page. By doing this, you will lose access to all the special features and benefits native input provides.</p>
<p><strong>Q: But it used to work before updating Rewired to 1.1.3.0+:</strong></p>
<p>It actually did have the same issue, but you just 
  couldn’t see it because Rewired was never actually running in native mode when 
  the 4.6 backend was enabled in versions prior to 1.1.3.0 because of an unrelated exception <br />
  that made it fall back to Unity input silently. This exception was due to an unrelated issue involving 
  reflection  when using the .NET 4.6 backend. The exception was silently swallowed forcing Rewired 
  to run in UnityEngine.Input mode instead. In 1.1.3.0, the silent exception was fixed allowing native input to actually be initialized revealing the new .NET 4.6 bug. Native input never worked when using the 
  4.6 .NET backend. The fact that older versions looked like they worked was 
  just a fluke due to the unrelated exception preventing native input from being initialized.</p>
<p><em>Beta versions and experimental features of Unity are not supported by Rewired.</em></p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-ri-hid-error" id="windows-ri-hid-error"></a>Windows Editor: &lt;RI.Hid&gt; Failed to create device file: 2 The system cannot find the file specified.</h3>
<p>You may see the following error when starting the Unity Editor:</p>
<ul>
  <li>&lt;RI.Hid&gt; Failed to create device file: 2 The system cannot find the file specified.</li>
</ul>
<p>This error is logged by Unity itself and is not created by Rewired, nor is it related to Rewired in any way. It cannot be silenced or fixed. <a href="https://forum.unity3d.com/threads/ri-hid-failed-to-create-device-file.202934/" target="_blank">There is a forum thread detailing the issue here</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-stuck-button-right-click-window-title-bar" id="windows-stuck-button-right-click-window-title-bar"></a>Windows Standalone: Keyboard and mouse keys get stuck on when holding a key, right-clicking on the window's title bar, and then releasing the key</h3>
<p>This  bug affects the Unity Editor and builds running in windowed mode on Windows, OSX, and (possibly) Linux.</p>
<p>This is due to a bug in UnityEngine.Input which is used as the source of keyboard input on most platforms at the present time. Mouse buttons will also get stuck on in this same scenario of UnityEngine.Input is being used as the mouse input source (OSX, Linux, or if Native Mouse Handling is disabled on Windows.)</p>
<p>On Windows, enabling <a href="RewiredEditor.html#Settings">Native Keyboard Handling</a> will eliminate this issue. Unfortunately, for other platforms, there is no workaround possible for this issue at this time. The bug has been reported to Unity.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-app-store-u5" id="windows-app-store-u5"></a>Windows App Store support not working in Unity 5.0.0, fixed in 5.0.1</h3>
<p>Due to a new bug introduced in Unity 5.0.0, Rewired is unable to be compiled in this version of Unity. The bug was fixed in Unity 5.0.1, so upgrade to 5.0.1 if you need Windows App Store support.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-high-refresh-rate-mouse-slowdown" id="windows-high-refresh-rate-mouse-slowdown"></a>Windows Standalone: High refresh rate mouse causes slowdown and profiler spikes</h3>
<p><strong>Update:</strong> This issue has been fixed by Unity in 2021.2.0f1. Also, a corresponding change had to be made to Rewired due to their new changes to fix this issue, so you must use Rewired 1.1.41.0+ in conjunction with Unity 2021.2.0f1+ to support high refresh rate mice.</p>
<p>A high refresh rate mouse causes slowdowns, high cpu usage, and profiler spikes in Unity. This is not a Rewired issue. It is 100% a Unity issue and cannot be fixed by Rewired.</p>
<p>It has been reported to me numerous times that Rewired is causing high CPU usage causing spikes in the profiler when moving the mouse. The profiler will report a particular function in Rewired_Windows.dll is using many milliseconds of time. This is a false flag. The problem is in Unity, not Rewired.</p>
<p> The only reason Rewired is even shown in this stack trace is because of   how the Raw Input mouse event rerouting works. An application may only   receive Raw Input events for a particular device type to one single   window. Unity requires these events for their mouse input to work.   Rewired also needs to receive these events for its Raw Input mouse to   work. Rewired creates a message window, subscribes to Raw Input events   to this window, then it reroutes the Raw Input mouse events back to   Unity when they come in. What happens after that is out of Rewired's   control. Unity becomes downstream of Rewired and therefore Rewired ends   up in the stack trace.</p>
<p>This is easily proven by performing the same test in a fresh project without Rewired installed. You will see the exact same spikes in the profiler without Rewired anywhere in the mix.</p>
<p>Mice with a 1000+ Hz refresh rate seem to cause the most problems. The higher the rate, the more slowdown.</p>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h2><a name="uwp" id="uwp"></a>Windows 10 Universal (UWP):</h2>
<p>&nbsp;</p>
<h3><a name="uwp-il2cpp-error-2020-2" id="uwp-il2cpp-error-2020-2"></a>Windows 10 Universal: IL2CPP build error <span class="code">(no further information about what managed code was being converted is available)</span></h3>
<p><strong>Severity: <span  style="color: #ff0000">Critical</span></strong><br />
  <strong>Solution: <span style="color: #008800">Update to Rewired 1.1.38.4+.</span></strong></p>
<p>As of Unity 2020.2.0f1, versions of Rewired prior to 1.1.38.4 no longer function on the UWP platform due to a new IL2CPP issue introduced in Unity 2020.2.0f1+.</p>
<pre class="code">Exception: IL2CPP error (no further information about what managed code was being converted is available)
System.NullReferenceException: Object reference not set to an instance of an object.
   at Unity.IL2CPP.Extensions.ModuleInitializerMethod(AssemblyDefinition assembly)
   at Unity.IL2CPP.Metadata.PerAssemblyCodeMetadataWriter.Write(SourceWritingContext context, AssemblyDefinition assembly, GenericContextCollection genericContextCollection, String assemblyMetadataRegistrationVarName, String codeRegistrationVarName)</pre>
<p>&nbsp;</p>
<hr />
<h3><a name="uwp-gamepads-appear-twice" id="uwp-gamepads-appear-twice"></a>Windows 10 Universal: Certain gamepads appear twice when HID device support is enabled</h3>
<p><strong>Solution: <span style="color: #008800">Update to Rewired 1.1.47.0+.</span></strong></p>
<p>Microsoft has apparently started mapping non-Xbox gamepads like the Sony DualShock 4 to make them appear as XInput devices through their UWP Windows.Gaming.Input system. This has the side effect that, if you enable the application to allow the use of HID input devices in the Package.appxmanifest, the DualShock 4 will show up as 2 devices at the same time -- an XInput gamepad and the HID DualShock 4 gamepad. While true XInput gamepads provide a way to identify them as such through the HID system, Microsoft has provided no way to determine that these pseudo-XInput devices (HID devices are being  treated as XInput devices) are being handled by XInput, so there is no way to programatically filter out these duplicate devices. The only workaround is to disable HID device support. You can either do this by removing HID support from the package manifest in the Visual Studio build project or by disabling the <a href="RewiredEditor.html#settings-uwp">&quot;Support HID Devices&quot; option in the Rewired Input Manager -&gt; Settings -&gt; Windows UWP page</a>. This allows you to choose to support the Gamepad (XInput) system and/or the HID system for input devices. This is still not ideal, but it at least gives you the option to disable XInput to allow for wider device support without risking duplicate devices, though disabling XInput will also disable support for controller vibration. There is no perfect solution because Microsoft simply has not provided the ability to get the necessary information to allow devices to be filtered properly. Edit: New API functionality has been added by Microsoft that makes device filtering possible and a fix was implemented in Rewired 1.1.47.0.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="uwp-il2cpp-controller-disconnect-crash" id="uwp-il2cpp-controller-disconnect-crash"></a>Windows 10 Universal IL2CPP: Crash when disconnecting controllers</h3>
<p>There are three different disconnect crash scenarios, each with its own circumstances:</p>
<p><strong>Scenario 1: XInput controllers on Unity 2018.2.0 - 2018.2.18</strong></p>
<p><strong>Severity: <span  style="color: #ff0000">Critical</span></strong></p>
<p><strong style="color: #008800">This issue was fixed by Unity in version 2018.2.19. Update to Unity 2018.2.19+.</strong><strong><span  style="color: #ff0000"><br />
</span></strong></p>
<p>Starting with Unity 2018.2.0, XInput-compatible controllers will crash the application when unplugged if the application is started with any XInput-compatible controller connected. This is a bug in Unity, not Rewired, and there is no possible workaround.</p>
<p>This bug occurs when any script or library makes a call to any part of the Windows.Gaming.Input.Gamepad API. Simply making this call will result in Unity crashing internally the next time a controller is unplugged. Use of Windows.Gaming.Input.Gamepad is absolutely required in order to get input natively from gamepads in Windows UWP.</p>
<p>You can easily reproduce this by creating a new Unity project and adding this script to a GameObject:</p>
<pre class="code">using UnityEngine;

public class GamepadTest : MonoBehaviour {
#if ENABLE_WINMD_SUPPORT
    void OnGUI() {
        GUILayout.Label(&quot;Gamepad Count: &quot; + Windows.Gaming.Input.Gamepad.Gamepads.Count);
    }
#endif
}</pre>
<p>Build the application and launch it with a gamepad connected. Unplug it and the application will crash with the following stack trace:</p>
<pre class="code">UnityPlayer.dll!dynamic_array&lt;class GameControllers::Gamepads::XboxGamepad,0&gt;::erase(class GameControllers::Gamepads::XboxGamepad *,class GameControllers::Gamepads::XboxGamepad *)
UnityPlayer.dll!GameControllers::Gamepads::XboxGamepads::UpdateCurrentGamepadList(void)
UnityPlayer.dll!GameControllers::Gamepads::XboxGamepads::GetCurrentGamepads(void)
UnityPlayer.dll!GameControllers::Gamepads::ProcessGamepadInput(class InputManager &amp;,class std::map&lt;unsigned int,int,struct std::less&lt;unsigned int&gt;,class std::allocator&lt;struct std::pair&lt;unsigned int const ,int&gt; &gt; &gt; &amp;,struct dynamic_array&lt;unsigned int,0&gt; &amp;)
UnityPlayer.dll!Input::PreProcess(class Vector2f const &amp;)
UnityPlayer.dll!UnityPlayer::AppCallbacks::DoPerformUpdateAndRender(void)
UnityPlayer.dll!UnityPlayer::AppCallbacks::PerformUpdateAndRender(void)
UnityPlayer.dll!UnityPlayer::AppCallbacks::_AppThreadImplementation(void *)
UnityPlayer.dll!UnityPlayer::AppCallbacks::_AppThread(void *)
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()</pre>
<p>This affects the .NET scripting backend and the IL2CPP scripting backend.</p>
<p>Solution: Update to Unity 2018.2.19+.</p>
<p><strong>Scenario 2: Non-XInput controllers</strong></p>
<p>As of Unity 5.3.4f1, after enabling support for standard HID joysticks in the Package.appxmanifest, Unity may crash when disconnecting a non-XInput controller (also happens with XInput controllers in Untiy 2017). This is a bug in Unity, not Rewired and there is no possible workaround if you want to support any controllers besides XInput controllers. (To disable support for non-XInput controllers, remove the <a href="SpecialPlatformSupport.html#uwp-enabling-hid-joystick-support">tags added to the Package.appxmanifest mentioned here</a>.) This bug has been reported to Unity, but so far no fix has been announced.</p>
<p>This issue does not affect Windows 10 Universal builds when using the .NET scripting backend.</p>
<p><strong>Update:</strong> This bug has been fixed as of Unity 5.3.5p1.<br />
  <strong>Update 2:</strong> This bug has resurfaced in Unity 2017.1.</p>
<p><strong>Scenario 3: Xbox One S controller</strong></p>
<p>As of Unity 2017.1, after enabling support for standard HID joysticks in the Package.appxmanifest and disabling Use XInput in the <a href="RewiredEditor.html#Settings">Rewired Editor -&gt; Settings for Windows 10 UWP</a>, the application will always crash when disconnecting an Xbox One S controller. This issue comes from the Windows HID API used to get HID device events. When Use XInput is enabled, the Xbox One S controller will be handled through the Windows.Gaming.Input API instead and no longer cause the crash.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="uwp-shift-keys" id="uwp-shift-keys"></a>Windows 10 Universal: Left Shift is activated when Right Shift is pressed</h3>
<p>The left and right Shift keys cannot be differentiated on Windows UWP due to a bug/oversight in the Windows UWP API. Windows does not send key up events for the opposing Shift key when released while holding down the other Shift key. This makes it impossible to support both Shift keys as individual keys. Because of this issue, the two Shift keys can only reliably be treated as a single key. When either Shift key is pressed, only Left Shift will will return true. Right Shift will never return true. This is an issue with the underlying Windows UWP API and not a Rewired bug. There is no possible workaround.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="uwp-net-550-reference-rewriter-error" id="uwp-net-550-reference-rewriter-error"></a>Windows 10 Universal .NET: UnityException: Failed to run reference rewriter error on Unity 5.5.0, 5.5.1</h3>
<p>You may receve an error similar to below when building to Windows 10 Universal on .NET on Unity 5.5.0 and 5.5.1:</p>
<pre class="code">UnityException: Failed to run reference rewriter with command --target=&quot;Temp\StagingArea\Rewired_Core.dll&quot; --additionalreferences=&quot;Temp\StagingArea&quot;,&quot;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade&quot;,&quot;C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0&quot;,&quot;C:\Program Files (x86)\Windows 

...

Catastrophic failure while running rrw: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Windows.Foundation.UniversalApiContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'</pre>
<p>This error occurs when you have the Windows 10 &quot;Creator's Update&quot; SDK installed (10.0.15063.0) or later, but do not also have older versions of the SDK also installed. This is presumably due Unity not searching the correct location for the SDK libraries in this version of the Windows 10 SDK. The issue was fixed in 5.5.1. There are two possible solutions to this issue. Do one of the following:</p>
<ol>
  <li> Install Unity 5.5.2 or later.</li>
  <li>Install an <a href="https://developer.microsoft.com/en-us/windows/downloads/sdk-archive" target="_blank">older version of the Windows 10 SDK</a> also.</li>
  </ol>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h2><a name="osx" id="osx"></a>MacOS:</h2>
<p>&nbsp;</p>
<h3><a name="osx-application-freeze-on-initialize" id="osx-application-freeze-on-initialize"></a>OSX: Application freezes forever when initializing Rewired</h3>
<ul>
  <li>This is actually a Unity bug that happens to affect Rewired. It cannot be fixed or worked around by Rewired.</li>
  <li>The bug is present in the latest versions of Unity as of this writing: Unity 2022.3.12f1 and 2023.1.18f1, Apple M1, MacOS 14.0. The bug has been reported to Unity.</li>
  <li>When a controller is disconnected from the system, there is a small chance that Unity's HID controller handling code will freeze permanently. This appears to be done on a separate thread because it does not cause the application to stop functioning. However, it does stop controllers from ever being detected again until the application or Unity editor is quit. Without Rewired involved, Unity's controller support just simply stops functioning.</li>
  <li>However, if Rewired is initialized at any time after Unity's input system freezes, Rewired's function call to I/O Kit's HID Manager to specify which types of controllers to monitor will block forever causing the entire application to freeze permanently. There is no workaround without Unity fixing the underlying bug that is causing this.</li>
  <li>To minimize the possibility of this affecting a final game, initialize Rewired only once very early in the game initialization sequence and never initialize it again. Even if Unity's input system freezes after controllers are connected and disconnected, it will not affect Rewired in any way so long as Rewired has already been initialized. If the Rewired Input Manager were to be destroyed or disabled, then re-instantiated or re-enabled, Rewired would be required to initialize again and would freeze when I/O HID Manager is being setup. Likewise, do not allow the user to change any runtime settings that require Rewired to be reset such as changing the primary input source or enabling / disabling optional secondary input sources.</li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="osx-apple-silicon-crash" id="osx-apple-silicon-crash"></a>OSX, Apple Silicon: Build crashes when a controller is connected</h3>
<p>Unity has a bug that causes a crash when any native code calls back into managed code. This cannot be fixed or worked around. Only Unity can fix this bug and Rewired's native input cannot function without this feature. The only way to get around this issue is to build to IL2CPP.</p>
<p><a href="https://issuetracker.unity3d.com/issues/macos-aot-dot-monopinvokecallback-native-to-managed-callback-fails-with-apple-silicon-when-scripting-backend-is-mono">More information about the Mono bug can be found at the Unity bug tracker</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="osx-standalone-il2cpp" id="osx-standalone-il2cpp2"></a>OSX, IL2CPP: Rewired falls back to Unity input</h3>
<p>Support for IL2CPP on desktop platforms was added in Rewired 1.1.22.0.</p>
<p><strong>Solution:</strong> <a href="Updating.html">Update Rewired</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="osx-net46-initialization-exception" id="osx-net46-initialization-exception"></a>OSX, .NET 4.6 experimental backend: Throws exception on initialization  in Unity 2017.1 - 2017.3</h3>
<p><strong>Update:</strong> The Unity bug was fixed in Unity 2017.4.1f1. Any version of Unity after that should work correctly.</p>
<p><strong>Solution:</strong> Update to Unity 2017.4.1f1+.</p>
<p>As of Unity 2017.2.0f3, when the .NET 4.6 experimental backend is enabled in OSX, an exception will be thrown on initialization causing Rewired to not function. This exception is due to a bug in the .NET 4.6 experimental backend that prevents all P/Invoke calls from functioning, always throwing a DllNotFoundException. The exact same call works using the .NET 3.5 backend while the 4.6 backend fails. This bug has been reported to Unity.</p>
<p>Due to the severity of this bug, until Unity fixes it, it is impossible for Rewired to use native input on OSX with the .NET 4.6 backend enabled. The only workaround is to disable native input by setting the Primary Input Source for the  platform to Unity in the Rewired Input Manager -&gt; Settings -&gt; OSX page. By doing this, you will lose access to all the special features and benefits native input provides.</p>
<p><strong>Q: But it used to work before updating Rewired to 1.1.3.0+:</strong></p>
<p>It actually did have the same issue, but you just 
  couldn’t see it because Rewired was never actually running in native mode when 
  the 4.6 backend was enabled in versions prior to 1.1.3.0 because of an unrelated exception <br />
  that made it fall back to Unity input silently. This exception was due to an unrelated issue involving 
  reflection when using the .NET 4.6 backend. The exception was silently swallowed forcing Rewired 
  to run in UnityEngine.Input mode instead. In 1.1.3.0, the silent exception was fixed allowing native input to actually be initialized revealing the new .NET 4.6 bug. Native input never worked when using the 
  4.6 .NET backend. The fact that older versions looked like they worked was 
  just a fluke due to the unrelated exception preventing native input from being initialized.</p>
<p><em>Beta versions and experimental features of Unity are not supported by Rewired.</em></p>
<p>&nbsp;</p>
<hr />
<h2><a name="osx-game-controller-framework" id="osx-game-controller-framework"></a>MacOS: Game Controller Framework</h2>
<p>&nbsp;</p>
<h3><a name="osx-gccontroller-vibration-connection-bug" id="osx-gccontroller-vibration-connection-bug"></a>MacOS, Game Controller Framework: Controller vibration stops working on some controllers when another controller is connected or disconnected</h3>
<p>When using the Game Controller Framework, controller vibration can stop working randomly when any Game Controller Framework compatible controller is connected to or disconnected from the system. This is a bug on Apple's end and cannot be fixed by Rewired. Once the vibration motors stop working on the connected controller(s), the only way to make them work again is to disconnect and reconnect the controller.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="osx-gccontroller-sony-controller-problems" id="osx-gccontroller-sony-controller-problems"></a>MacOS, Game Controller Framework: Sony Dual Shock 4 and Dual Sense controller issues</h3>
<p>Based on my testing, there are numerous issues with the Dual Shock 4 and Dual Sense controllers when using the Game Controller Framework. These issues are not caused by Rewired but by Apple's Game Controller Framework. There are no software fixes possible.</p>
<p>Issues I have experienced when testing on an M1 Mac connecting wirelessly:</p>
<ul>
  <li>The entire system stalls during connection of Dual Sense controller for several seconds.</li>
  <li>Some or all special controller features may or may not work, or may stop working.</li>
  <li>Light color may not change when calling SetLightColor.</li>
  <li>Acceleration and/or gyroscope values may not work.</li>
  <li>Vibration motors may not work or may stop working.</li>
</ul>
<p>The only workaround I have found is to unpair and repair the controller as many times as it takes until the controller starts working correctly. Simply disconnecting and reconnecting the controller does not seem to help. Only unpairing and repairing appears to make a difference.</p>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h2><a name="linux" id="linux"></a>Linux:</h2>
<p>&nbsp;</p>
<h3><a name="linux-standalone-il2cpp" id="linux-standalone-il2cpp"></a>Linux, IL2CPP: Rewired falls back to Unity input</h3>
<p>As of Unity 2018.3.0, Unity does not support IL2CPP on Linux. If/when IL2CPP support is added to Unity, Rewired versions of 1.1.22.0+ should automatically just work. Obviously this cannot be tested until Unity adds support for the platform.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="keyboard-stuck-linux" id="keyboard-stuck-linux"></a>Keyboard keys stuck on Linux in Unity 5.1.1</h3>
<p>Rewired uses UnityEngine.Input.GetKey to get keyboard input on Linux. Underlying issues in UnityEngine.Input's keyboard handling are inherited by Rewired.</p>
<p>This is not a Rewired issue, it's a Unity bug:<br />
  <a href="https://forum.unity3d.com/threads/unity-5-1-1-broke-input-for-linux-standalone.335113/">https://forum.unity3d.com/threads/unity-5-1-1-broke-input-for-linux-standalone.335113/</a></p>
<p>Update to Unity 5.1.2 to fix it.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="linux-keyboard-repeat-bug-builds" id="linux-keyboard-repeat-bug-builds"></a>Keyboard keys repeat when held on Linux in builds
</h3>
<p></p>
<p>Rewired uses UnityEngine.Input.GetKey to get keyboard input on Linux. Underlying issues in UnityEngine.Input's keyboard handling are inherited by Rewired.</p>
<p>This bug only affects builds on Linux, not the Linux editor. It also only affects certain versions of Linux.</p>
<p>Unity has already patched the issue in 2018.2.0b2. The change causing this bug was added in some version of Unity after 2017.1.0f3 (see tests below).</p>
<p>UnityEngine.Input.GetKey now toggles on and off in rapid succession frame by frame after a short key-repeat delay. This makes it so that the ButtonDown state becomes true every few milliseconds. Because Unity is telling Rewired that the key going on and off in rapid success, Rewired translates this into GetButtonDown and GetButtonUp every few frames. There's absolutely no way around this other than writing a native keyboard library for Linux and replacing UnityEngine.Input for this portion of input. This may be added in a future release and this page will be updated.<br />
</p>
<p>Results of tests:</p>
<p>Ubuntu 14.04 + Unity 5.0.0f4 = No issue<br />
  Ubuntu 14.04 + Unity 2017.1.0f3 = No issue<br />
  Ubuntu 14.04 + Unity 2017.4.2f2 = No issue<br />
  Ubuntu 14.04 + Unity 2018.1.0f1 = No issue<br />
  Ubuntu 14.04 + Unity 2018.2.0b2 = No issue<br />
  <br />
  Ubuntu 17.04 + Unity 5.0.0f4 = No issue<br />
  Ubuntu 17.04 + Unity 2017.1.0f3 = No issue<br />
  Ubuntu 17.04 + Unity 2017.4.2f2 = <span style="color: red">PROBLEM</span><br />
  Ubuntu 17.04 + Unity 2018.1.0f1 = <span style="color: red">PROBLEM</span><br />
  Ubuntu 17.04 + Unity 2018.2.0b2 = No issue <span style="color: #090">&lt;- Unity patched the issue</span></p>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h2><a name="unity-editor" id="unity-editor"></a>Unity Editor (all platforms):</h2>
<p>&nbsp;</p>
<h3><a name="editor-recompile-after-finished-playing" id="editor-recompile-after-finished-playing"></a>Rewired stops working when changing scripts in Play mode with &quot;Recompile After Finished Playing&quot; option</h3>
<p><strong>Update: A workaround was added in Rewired 1.1.28.0.</strong></p>
<p>The setting Preferences -&gt; General -&gt; Script Changes While Playing -&gt; Recompile After Finished Playing causes Rewired to stop working when making a change to a script while in Play mode.</p>
<p>Rewired must be able to tell when recompilation starts and ends in order to safely shut down and re-initialize. Rewired uses various functions in the Unity API to determine this. It relies on UnityEditor.EditorApplication.isCompiling to know when this process has started and ended.</p>
<p>When you change the option to &quot;Recompile After Finished Playing&quot;, Unity sets the value of UnityEditor.EditorApplication.isCompiling to True immediately when it detects a change to a script even though the application is not actually compiling. It never sets this value back to false because the setting makes it wait until Play mode ends before it can actually recompile. Meanwhile, Rewired has shut itself down when it detected the start of recompilation. It waits until Unity tells it compliation has ended before it reinitializes itself. Since the value from Unity remains False forever, Rewired stays shutdown until Play mode is stopped and restarted. This is a bug in Unity, not Rewired.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="control-mapper-compiler-error-unity-2019-1-5f1" id="control-mapper-compiler-error-unity-2019-1-5f1"></a>Compiler error in Unity 2019.1.5f1 when Control Mapper installed</h3>
<p><strong>Update: This was patched in Rewired 1.1.26.1.</strong></p>
<p>Unity made a breaking API change in 2019.1.5f1 even though they are not supposed to make breaking API changes in a minor version update.</p>
Change the line in Rewired/Extras/ControlMapper/Scripts/UISelectionUtility.cs that reads:
<pre class="code">selectableCount = Selectable.AllSelectablesNoAlloc(ref s_reusableAllSelectables);</pre>
to
<pre class="code">selectableCount = Selectable.AllSelectablesNoAlloc(s_reusableAllSelectables);</pre>
<p>All you have to do is remove the ref keyword.</p>
<p>For more information, <a href="https://forum.unity.com/threads/rewired-advanced-input-for-unity.270693/page-107#post-4611661">see this forum post</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="assembly-errors-2019-2" id="assembly-errors-2019-2"></a>Assembly errors in projects upgraded to Unity 2019.2</h3>
<p><strong>Update:</strong> This bug was fixed in Unity 2020.1.0a13.</p>
<p>Projects upgraded to Unity 2019.2 from a previous version (including a beta version) may report the following errors:</p>
<pre class="code">- Error: Could not load signature of
Rewired.ComponentControls.Effects.TouchInteractableTransitioner:get_transitionColorTint
due to: Could not load file or assembly 'UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. assembly:UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null)
signature:<none>

-Error: Could not load signature of
Rewired.Editor.ComponentControls.TouchInteractableEditor:GenerateInteractableAnimatorContoller
due to: Could not load file or assembly 'UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. assembly:UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null)
signature:<none>
</pre>
<p>This error is not an error in Rewired. It's an error in Unity's upgrade process due to changes they've made moving the UI assembly to the Package Manager. This error does not occur in a new 2019.2.0f1 project that has not been upgraded.</p>
<p>The resolution to this issue is to simply ignore the errors. They will not be shown again when the editor is closed and restarted. Note, the errors may return if doing a &quot;Reimport All&quot; operation, but again, they're just costmetic.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="assembly-errors-2019-3-alpha-beta" id="assembly-errors-2019-3-alpha-beta"></a>Assembly and build errors in 2019.3 alpha/beta</h3>
<p>First, <a href="Troubleshooting.html#unity-alpha-beta-preview-experimental">alpha, beta, preview, and experimental, versions and features of Unity are not suppored</a>.</p>
<p>Rewired may not be compatible with Unity 2019.3 alpha. If you install Rewired you may see the following errors:<br />
</p>
<pre class="code">Assembly 'Assets/Rewired/Internal/Libraries/Editor/Rewired_Editor.dll' will not be loaded due to errors:
Unable to resolve reference 'UnityEngine.UI'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
 
Assembly 'Assets/Rewired/Internal/Libraries/Runtime/Rewired_Core.dll' will not be loaded due to errors:
Unable to resolve reference 'UnityEngine.UI'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
 
Assembly 'Assets/Rewired/Internal/Libraries/Runtime/Rewired_Windows.dll' will not be loaded due to errors:
Reference has errors 'Rewired_Core'.</pre>
<p>Unity has made a major breaking change. The Unity UI library has been moved from UnityEngine.UI.dll as part of the core Unity installation to Unity.ugui.dll as an optional install through the Package Manager. This change to the DLL name which breaks all assembly references in Rewired's DLLs. This issue affects all DLLs that reference Unity UI, not just Rewired, including many of the most popular assets on the Unity Asset Store. There is no possible workaround to this issue.</p>
<p>Unity has acknowledged these changes as a mistake and has made changes to allow DLLs to work again in a later alpha/beta release. <a href="https://forum.unity.com/threads/ui.673504/">See this forum thread for more details</a>. However, even though they have made changes to make it work again, it does have side effects with possible errors being reported when upgrading a project from an older version of Unity. <a href="#assembly-errors-2019-3-alpha-beta">See this for more information.</a></p>
<p>You may also get the following error when you try to make a build. This error will go a way the next time you attempt a build, but will come back at the following build. Every other build attempt will result in the following failure. This is a known Unity issue and has a <a href="https://issuetracker.unity3d.com/issues/android-build-and-run-fails-when-rewired-is-present-in-the-project?_ga=2.154422527.616726974.1573495467-1748309352.1525716169">bug tracker page</a> here. <strong>Update:</strong> This bug has reportedly been fixed in the latest 2019.3 beta and 2020.1 alpha.</p>
<pre class="code">Type '[Rewired_Core]Rewired.ComponentControls.Effects.TouchInteractableTransitioner' has an extra field '_transitionColorTint' of type 'UnityEngine.UI.ColorBlock' in the player and thus can't be serialized (expected '_syncFadeDurationWithTransitionEvent' of type 'System.Boolean')

...

Fields serialized in target platform, class 'Rewired.ComponentControls.TouchInteractable'
'_interactable' of type 'System.Boolean'
'_visible' of type 'System.Boolean'
'_hideWhenIdle' of type 'System.Boolean'
'_allowedMouseButtons' of type 'Rewired.ComponentControls.TouchInteractable+MouseButtonFlags'
'_transitionType' of type 'Rewired.ComponentControls.TouchInteractable+TransitionTypeFlags'
'_transitionColorTint' of type 'UnityEngine.UI.ColorBlock'
'_transitionSpriteState' of type 'UnityEngine.UI.SpriteState'
'_transitionAnimationTriggers' of type 'UnityEngine.UI.AnimationTriggers'
'_targetGraphic' of type 'UnityEngine.UI.Graphic'
'_onInteractionStateTransition' of type 'Rewired.ComponentControls.TouchInteractable+InteractionStateTransitionEventHandler'
'_onVisibilityChanged' of type 'Rewired.ComponentControls.TouchInteractable+VisibilityChangedEventHandler'
'_onInteractionStateChangedToNormal' of type 'UnityEngine.Events.UnityEvent'
'_onInteractionStateChangedToHighlighted' of type 'UnityEngine.Events.UnityEvent'
'_onInteractionStateChangedToPressed' of type 'UnityEngine.Events.UnityEvent'
'_onInteractionStateChangedToDisabled' of type 'UnityEngine.Events.UnityEvent'
</pre>
<p>&nbsp;</p>
<hr />
<h3><a name="increased-compile-play-time-editor" id="increased-compile-play-time-editor"></a>Rewired increases compile time and load time after pressing Play in the editor</h3>
<p>The additional load time can be attributed entirely to Unity loading the serialized data from Rewired's <a href="SupportedControllers.html">many controller definitions</a> which are used to recognize, map, and calibrate known controllers. The simple fact that the controller data files are linked from an object field in the Rewired Input Manager GameObject's component causes Unity to load those objects regardless of whether the GameObject is enabled or not. Unfortunately there's nothing that can be done to reduce it except to <a href="HowTos.html#excluding-controller-definitions">remove controller definitions</a> to reduce the number that have to be loaded. <br />
  <br />
  Unity has to deserialize all the controller definition data every time you press Play or recompile scripts. There isn't any way to both keep the support for all these controllers and get the startup time any faster without completely overhauling the controller definition system to use a database or some other means to store all this data. Doing that would bring all kinds of other challenges and issues because it would have to be cross-platform and work on every single platform Unity supports (22+ now) and would invalidate any custom controller definitions created by users. Rewired was written using the &quot;Unity way&quot; of doing things, using their data storage structures, built-in systems, and editors. Unfortunately, this means I don't have control over every single aspect of the process.<br />
  <br />
  While this increase in startup time may be significant to a blank project, in a real game project, it's likely that the game itself's startup time would be significantly greater than this and therefore the perceived impact would be much smaller vs a blank scene.<br />
  <br />
  It is worth noting that there is no perceivable difference in load time in a final build. A completely blank scene and a scene with an enabled Rewired Input Manager both start instantaneously (Unity splash screen disabled.) This is only an issue in the Unity editor.</p>
<p><strong>How to temporarily remove Controller definitions to speed up development</strong></p>
<p>The fewer controllers supported, the less the delay when the app domain is rebuilt. Just click the &quot;ControllerDataFiles&quot; field in the Rewired Input Manager inspector which will take you to the default ControllerDataFiles object in the Rewired directory, copy the existing ControllerDataFiles, move the copy outside the Rewired folder, link the new ControllerDataFiles in the Rewired Input Manager inspector, then go to the new ControllerDataFiles inspector and remove all the controllers you don't need while doing your development. You can pare this down to like 10 controllers (Xbox, DS4, etc.) and Rewired will add zero extra startup time. Remember to link back the original ControllerDataFiles in the Rewired Input Manager before building so all controllers are supported.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="serialized-data-corruption-after-import" id="serialized-data-corruption-after-import"></a>Serialized data corruption after importing Rewired </h3>
<p>Unity has a major bug in the Unitypackage importer that can lead to data corruption when importing an asset from the Unity Asset Store or a Unitypackage file.</p>
<p>If your Unity <a href="https://docs.unity3d.com/Manual/class-EditorManager.html" target="_blank">Editor Settings -&gt; Asset Serialization Mode</a> is set to &quot;Force Binary&quot;, serialized data may be corrupted when you import a Unitypackage. This often happens when a new Unitypackage is imported. If you then re-import the same package over the previous import, it will be imported correctly. If you then delete the imported files and re-import them, they will be corrupted again.</p>
<p>Corrupted serialized data in Rewired can manifest itself as inexplicable errors and exceptions being thrown for no reason making Rewired completely unusable. The best thing to do in this case is to change the Asset Serialization Mode to &quot;Mixed&quot; or &quot;Force Text&quot; and re-import Rewired. If that's not possible or you don't want to have to wait for all your assets to be re-imported in the new serialization mode, import the Rewired asset twice in a row (do not delete the Rewired folder after the first import). The serialized data should be intact after the second import.</p>
<p>This bug has been reported to Unity. They have been able to reproduce it and have sent it to the developers for resolution. No ETA was given.</p>
<p>Last tested version: Unity 5.3.5f0</p>
<p>Please note that this is a Unity bug and can affect any asset. This is not an issue with Rewired.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="serialized-data-corruption-after-upgrading-unity" id="serialized-data-corruption-after-upgrading-unity"></a>Serialized data corruption after upgrading Unity</h3>
<p>Unity's data serializer has bugs which can cause serialized data in scenes and prefabs to become corrupt after upgrading Unity and allowing it to re-import the assets. This normally seems to happen with serialized strings. If you've recently upgraded Unity and you start seeing weird errors or warnings logged about Actions missing that have long nonsense string names, your serialized data may have been corrupted in Unity. There is no way to fix this other than to restore a backup. For this and many other reasons, it's imperative that you back up your project before upgrading Unity.</p>
<p>Please note that this is a Unity bug and can affect any asset. This is not an issue with Rewired.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="installer-bug-1181" id="installer-bug-1181"></a>Installer error in Rewired 1.1.8.1</h3>
<p>Rewired 1.1.8.1 shipped with a bug that causes the installer to report an error upon installation in Unity 4.x and 5.x. Unity 2017 doesn't appear to have this issue.</p>
<p>Changes were made to the installer system in 1.1.8.1 to use a folder GUID to locate the Rewired folder. Rewired has to be able to determine the path of the main Rewired folder so it can handle file management (installing addons, documentation, etc.)  Rewired previously used Rewired_Core.dll as a fixed locator to find the main Rewired folder. Some users wanted to be able to move the Rewired_Core.dll to another location, but doing so before would cause Rewired's editor scripts to fail because Rewired could no longer find its main folder. A change was made in 1.1.8.1 to use the GUID of the Rewired/Internal folder to locate the Rewired folder instead. However, Unity 4.x and 5.x  do not preserve the GUID of folders in the Unitypackage making this new technique completely fail.  Rewired 1.1.8.2 corrects this error.</p>
<p><strong>Workaround Instructions:</strong></p>
<ul>
  <li>First, enable visible meta files.
    
    This is done by selecting Edit-&gt;Project Settings-&gt;Editor in the application menu and enabling External Version Control support by selecting Visible Meta Files in the dropdown for Version Control.<br />
  </li>
  <li> Next, open Assets/Rewired/Internal.meta in a text editor.</li>
  <li> Change the GUID in the .meta file to:<br />
    8cdcfdd141b51d5458f981aaf449fd9f</li>
  <li>You may need to quit and restart the Unity editor for the change to take effect.</li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="il2cpp-p0-marshaled-error" id="compiler-error-512-patch2"></a>IL2CPP: _p0_marshaled': undeclared identifier error on Unity 5.3.2p1, 5.3.2p2</h3>
<p>Unity's 5.3.2p1 patch introduced a new IL2CPP error when building Rewired_Core.dll. This affects all platforms that use IL2CPP including iOS and Windows 10 Universal (IL2CPP scripting backend).</p>
<p>This is not an error in Rewired and there is no workaround for it. The only solution is to revert back to Unity version 5.3.2f1. Unity has announced the bug will be fixed in 5.3.2p3. <a href="https://forum.unity3d.com/threads/5-3-2p1-il2cpp-and-rewired-undeclared-identifier-_p0_marchaled.382953/#post-2490502" target="_blank">More details can be found here</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="compiler-error-512-patch" id="compiler-error-512-patch"></a>Compiler error in 5.1.2 patch releases</h3>
<p>Unity made an undocumented breaking change to UnityEngine.EventSystems.PointerInputModule.GetMousePointerEventData(). It now requires int id to be passed. This cannot be fixed automatically in my code until Unity 5.1.3 is released because there is no way to detect a patch version before compile.</p>
<p>More information and a patch:<br />
  <a href="https://forum.unity3d.com/threads/rewired-advanced-input-for-unity.270693/page-20#post-2216921">https://forum.unity3d.com/threads/rewired-advanced-input-for-unity.270693/page-20#post-2216921</a></p>
<p>&nbsp;</p>
<hr />
<h3><a name="editor-is-compiling-gc-alloc" id="editor-is-compiling-gc-alloc"></a>InputManager_Base.Update generates 17 bytes of GC Alloc per frame in the Profiler</h3>
<p>This is normal and unavoidable  and only happens in the UnityEditor. It is due to a bug/change in Unity 2017.</p>
<p>The InputManager.cs script included in the project calls UnityEditor.EditorApplication.isCompiling every frame in the Editor. This call generates a 17 byte memory allocation every time. This does not generate garbage in Unity 4 or 5 but does in Unity 2017.</p>
<div data-redactor="1">This call is required to be able to detect when the Editor is compiling for various needs in the Editor. Again, it happens only in the Unity Editor, not in builds. Rewired generates zero garbage per frame in the normal loop (apart from doing things like control remapping, etc.)</div>
<p>&nbsp;</p>
<p></p>
<hr />
<p>&nbsp;</p>
<h2><a name="android" id="android"></a>Android:</h2>
<p>&nbsp;</p>
<h3><a name="android-remotes" id="windows-app-store-u"></a>Remotes are not detected  (Nexus Player, Amazon Fire TV, Razer Forge TV, etc.)</h3>
<p>These remotes may not work on versions of Unity 5.02 or greater. Unity introduced a new bug in this version that makes the remote appear with a NULL name in the Input.GetJoystickNames array, which also happens to be used to fill the array entry when a controller is no longer connected. There is no way to identify these remotes because of this. The bug still exists as of 5.3.4f1. It has been reported and this information will be updated if a fix is issued.</p>
<p>The remotes will however still return keycodes through UnityEngine.Input. Most remotes use the keyboard arrow keycodes for movement. In addition, there are various workarounds possible using Custom Controllers such as shown in the following code example:</p>
<pre class="code"><span class="comment">// Copyright (c) 2016 Augie R. Maddox, Guavaman Enterprises. All rights reserved.

/*  Unity has a significant bug that prevents remotes from being recognized and handled as joysticks in Rewired.
    Therefore, the only workaround is to read the remote as (mostly) keyboard keys through UnityEngine.Input
    directly and feed this input to a Custom Controller. This script will read keyboard keys and
    Joystick Button 0 (on all joysticks) to determine the values to feed into the Custom Controller.
    
    To Use:
    1. Create a gameobject in the scene and assign this component to it and set the Player Id in the inspector.
    2. Create a Custom Controller in the Rewired Input Manager with 8 buttons and 0 axes.
    3. Asssign the Custom Controller to your Player and give it the tag &quot;AndroidRemote&quot;.
    4. Create a Custom Controller Map assigning Actions to each button.
    5. Assign the map to your Player.

    The element order is as follows:
    Button 0 = Up
    Button 1 = Down
    Button 2 = Left
    Button 3 = Right
    Button 4 = Center button
    Button 5 = Back button
    Button 6 = Menu button
    Button 7 = Select button
*/</span>

using UnityEngine;
using System;
using Rewired;

public class RewiredCustomController_AndroidRemote : MonoBehaviour {

    public int playerId;
    private const string controllerTag = &quot;AndroidRemote&quot;;

    private const int buttonCount = 8;
    private const int axisCount = 0;

    private Rewired.CustomController controller;

    [NonSerialized] <span class="comment">// Don't serialize this so the value is lost on an editor script recompile.</span>
    private bool initialized;

    private void Awake() {
        Initialize();
    }

    private void Initialize() {
#if UNITY_ANDROID

        <span class="comment">// Find the controller we want to manage</span>
        Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerId); <span class="comment">// get the player</span>
        controller = player.controllers.GetControllerWithTag<Rewired.CustomController>(controllerTag); <span class="comment">// get the controller</span>
        if(controller == null) {
            Debug.LogError(&quot;A matching controller was not found for tag \&quot;&quot; + controllerTag + &quot;\&quot;&quot;);
            return;
        }

        <span class="comment">// Verify controller has the number of elements we're expecting</span>
        if(controller.buttonCount != buttonCount || controller.axisCount != axisCount) { <span class="comment">// controller has wrong number of elements</span>
            Debug.LogError(&quot;Controller has wrong number of elements!&quot;);
            return;
        }

        <span class="comment">// Subscribe to the input source update event so we can update our source element data before controllers are updated</span>
        Rewired.ReInput.InputSourceUpdateEvent += OnInputSourceUpdate;
        
#endif

        initialized = true;
    }

#if UNITY_EDITOR
    <span class="comment">// This is just to handle re-initialization in the editor when recompiling at runtime</span>
    private void Update() {
        if(!Rewired.ReInput.isReady) return; <span class="comment">// Exit if Rewired isn't ready. This would only happen during a script recompile in the editor.</span>
        if(!initialized) Initialize(); <span class="comment">// Reinitialize after a recompile in the editor</span>
    }
#endif

    private void OnInputSourceUpdate() {
        GetSourceButtonValues();
    }

    private void GetSourceButtonValues() {
        <span class="comment">// Get values from the keyboard and joysticks</span>
        controller.SetButtonValue(0, Input.GetKey(KeyCode.UpArrow));
        controller.SetButtonValue(1, Input.GetKey(KeyCode.DownArrow));
        controller.SetButtonValue(2, Input.GetKey(KeyCode.LeftArrow));
        controller.SetButtonValue(3, Input.GetKey(KeyCode.RightArrow));
        controller.SetButtonValue(4, Input.GetKey(KeyCode.JoystickButton0)); <span class="comment">// Center button - Must use Joystick Button 0 on ALL joysticks because there's no way to know which joystick if any is the remote because of Unity's bug!</span>
        controller.SetButtonValue(5, Input.GetKey(KeyCode.Escape)); <span class="comment">// Back</span>
        controller.SetButtonValue(6, Input.GetKey(KeyCode.Menu)); <span class="comment">// Menu</span>
        controller.SetButtonValue(7, Input.GetKey(KeyCode.KeypadEnter)); <span class="comment">// Select</span>
    }
}
</pre>
<p></p>
<hr />
<p></p>
<h3><a name="android-unity-joystick-bugs-v5_5" id="android-unity-joystick-bugs-v5_5"></a>Joysticks do not sent connect/disconnect events, multiple joysticks appear when the same joystick is unplugged and re-plugged</h3>
<p>Unity introduced new bugs in Unity 5.5.0 that cause joysticks to not disappear on disconnect and create new additional joysticks every re-connect. This bug was fixed in 5.5.2p2 and 5.6.0b6. Upgrade to any Unity version after those and the issue will not be present.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="android-il2cpp-ndk-compiler-bug" id="android-il2cpp-ndk-compiler-bug"></a>IL2CPP: Editor crashes or takes a very long time to compile or stalls forever</h3>
<p>A bug in Android NDK r13b causes compilation to take an extremely long time or stall forever. The only solution to this bug is to update to a newer version of Rewired or the NDK.</p>
<p>The NDK bug is known to affect these versions of Rewired:</p>
<ul>
  <li>1.1.12.1</li>
  <li>1.1.13.0</li>
  </ul>
<p>Rewired 1.1.14.0+ is known to work correctly.</p>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h2><a name="ios-tvos" id="ios-tvos"></a>iOS / tvOS</h2>
<p>&nbsp;</p>
<h3><a name="ios-tvos-pause-menu-dont-work" id="ios-tvos-pause-menu-dont-work"></a>Gamepad Pause button and Siri Remote Menu button don't work</h3>
<p>This is a Unity bug. They introduced this bug when they added support for iOS 13. This bug affects various versions of Unity 2018.4, 2019.2, 2019.3, and 2020.1. This bug was fixed in the 2018.4, 2019.3, and 2020.1 branches. <a href="https://issuetracker.unity3d.com/issues/tvos-menu-button-on-siri-remote-returns-joystick1button19-instead-of-joystick1button0?_ga=2.29496572.273187001.1582997386-1748309352.1525716169" target="_blank">The bug tracker can be found here</a>.</p>
<p>The easiest way to fix this problem is to update Unity to a version that contains the fix. If you are using a version of Unity that was not updated and you do not want to update it, see these messages for a workaround:<br />
  <a href="https://forum.unity.com/threads/rewired-advanced-input-for-unity.270693/page-119#post-5430810" target="_blank">https://forum.unity.com/threads/rewired-advanced-input-for-unity.270693/page-119#post-5430810</a><br />
  <a href="https://forum.unity.com/threads/rewired-advanced-input-for-unity.270693/page-119#post-5438304" target="_blank">https://forum.unity.com/threads/rewired-advanced-input-for-unity.270693/page-119#post-5438304</a></p>
<p>&nbsp;</p>
<hr />
<h3><a name="ios-tvos-13-gamepad-left-stick-x-not-working" id="ios-tvos-13-gamepad-left-stick-x-not-working"></a>iOS/tvOS 13: Gamepad left stick X doesn't work</h3>
<p>This is a Unity bug. They introduced this bug when they added support for iOS 13. This bug affects various versions of Unity 2018.4, 2019.2, 2019.3, and 2020.1</p>
<p>Edit the iPhone_Sensors.mm file generated by Unity in the Xcode project:<br />
  <a href="https://forum.unity.com/threads/rewired-advanced-input-for-unity.270693/page-119#post-5438304" target="_blank">https://forum.unity.com/threads/rewired-advanced-input-for-unity.270693/page-119#post-5438304</a></p>
<p>&nbsp;</p>
<hr />
<h3>&nbsp;</h3>
<h2><a name="xbox-one" id="xbox-one"></a>Xbox One</h2>
<p>&nbsp;</p>
<h3><a name="xbox-one-controller-connections-error" id="xbox-one-controller-connections-error"></a>Controller connections and disconnections do not work</h3>
<p>There have been reports of controller connections and disconnections not working on Xbox One builds in Unity 2017.3. This issue is not with Rewired but with the underlying Unity Xbox One input event used to detect controller connections and disconnections. Apparently, Unity's Build and Run with Push method makes any
  build consecutive to the   first one exhibit broken controller connections. Changing build method to   Package seems to make the game build properly.<br />
</p>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h2><a name="sdl2" id="sdl2"></a>SDL2:</h2>
<h3><a name="sdl2-osx-editor-haptic-feedback-not-supported" id="sdl2-osx-editor-haptic-feedback-not-supported"></a>OSX - Editor does not support haptic feedback</h3>
<p>Due to a bug in SDL/Unity that causes an editor crash when enabled, haptic feedback (vibration) is not supported in the OSX Editor.</p>
<p>Note: This issue only applies if SDL2 is selected as the input source for OSX Standalone builds.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="sdl2-osx-xbox-360-controller-no-vibration" id="sdl2-osx-xbox-360-controller-no-vibration"></a>OSX - XBox 360 Controller does not support vibration</h3>
<p>SDL2 does not provide vibration support for the XBox 360 Controller on OSX.</p>
<p>Note: This issue only applies if SDL2 is selected as the input source for OSX Standalone builds.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="sdl2-windows-xbox-360-vibration-motors" id="sdl2-windows-xbox-360-vibration-motors"></a>Windows - XBox 360 Controller does not allow independent control of vibration motors</h3>
<p>SDL2's haptic feedback system only accounts for a single motor for rumble devices.</p>
<p>Note: This issue only applies if SDL2 is selected as the input source for Windows Standalone builds.</p>
<p></p>
<p></p>
<hr />
<p></p>
<h2><a name="steam" id="steam"></a>Steam</h2>
<p></p>
<h3><a name="steam-windows-tab-shift-keys-stuck-overlay" id="steam-windows-tab-shift-keys-stuck-overlay"></a>Windows - Tab and Shift keys get stuck on after opening Steam overlay using the keyboard</h3>
<p>When opening the Steam overlay with Shift + Tab key combination, the Shift and Tab keys will remain stuck on forever until the user presses each of these keys to release them.</p>
<p>This is due to the fact that Rewired uses Raw Input for keyboard input. Steam does not forward the Raw Input key up events for these keys to the application when the overlay is opened, therefore Rewired cannot know that these keys were ever released.</p>
<p>The only workaround at present is to disable Native Keyboard Handling in <a href="RewiredEditor.html#Settings">Rewired Editor -&gt; Settings -&gt; Windows</a>. This makes Rewired use Unity input for the keyboard input source. Unity input does not have this issue because it uses the older Windows keyboard API and Steam does forward the messages using this older API.</p>
<div class="bottom-pager clearfix">
  <a class="back-button" href="Documentation.html" title="Documentation"><span class="button-img"></span>Documentation</a>
</div>
  	  <!-- InstanceEndEditable -->
        </div>
        
    </div>
  <div class="footer clearfix">
   	<p class="left">Copyright &copy;2014-2021 <a href="https://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
  	<p class="right"><a href="https://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
  </div>
  <!-- end .content --></div>
  <!-- end .container --></div>
  
  
</body>
<!-- InstanceEnd --></html>
